{% extends "base.html" %}
{% block page %}
    <strong style="float:left;margin-left: 3%;margin-top: 4%">权限申请审批列表:</strong>
    <div style="clear:both"></div>
    <div style="text-align: center;border:1px solid #bbc1c9;width: 90%;margin-left: 3%">
        <div class="table-responsive">
            <div class="table-striped table-hover">
                <table class="table">
                    <tr>
                        {% for tab in tables %}
                            <th style="text-align: center;vertical-align: middle">{{ tab }}</th>
                        {% endfor %}
                    </tr>
                    {% if values %}
                        {% for value in values %}
                            <tr>
                                <td style="text-align: center;vertical-align: middle">{{ users[value[1]][0] }}</td>
                                <td style="text-align: center;vertical-align: middle">{{ users[value[1]][1] }}</td>
                                <td style="text-align: center;vertical-align: middle">{{ value[2] }}</td>
                                <td style="text-align: center;vertical-align: middle">{{ auths[value[3]] }}</td>
                                {% for val in value[4:] %}
                                    <td style="text-align: center;vertical-align: middle">{{ val }}</td>
                                {% endfor %}
                                <td style="text-align: center;vertical-align: middle">
                                    <a href="/approval?action=allow&id={{ value[0] }}">通过</a> |
                                    <a href="/approval?action=deny&id={{ value[0] }}">拒绝</a>
                                </td>
                            </tr>
                        {% endfor %}
                    {% endif %}
                </table>
            </div>
        </div>
    </div>
{% endblock page %}